package love.yuanmeng.guetcoalsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import love.yuanmeng.guetcoalsystem.pojo.Prop;
import love.yuanmeng.guetcoalsystem.vo.PropVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PropVoMapper extends BaseMapper<PropVo> {

    @Select("SELECT  e.enterprise_id,e.supplier_name, p.* " +
            "FROM guetcoal.user u ,guetcoal.prop p,guetcoal.enterprise_info e " +
            "WHERE u.id=p.userid and u.enterpriseid=e.enterprise_id  and (p.propstatus= 1 or p.propstatus=0)")
    List<PropVo> loadAllPropByStatusToVo();
}
